WDV221 Intro Javascript

Unit-2 Code Example - Variables and Data Types


1. Define a String variable call yourName. Put your name in the variable.

2. Define a Numeric variable called numberSold with a value of 37.

3. Define a Numeric variable called totalSales with a value of 123.45.

4. Define a variable called goodMonth. Assign it a boolean value of true.

5 Define a variable called annualSales. Do not assign it a value.

You can use the Javascript String object to find out information about a String variable or to manipulate its contents.

The yourName variable contains

Your name contains characters.

Your name in all capital letters is .